package Controller
{
	import Model.HeatRecoverySystem;
	import Model.Project;
	import Model.SubsoilHeatExchanger;
	
	import flash.sampler.NewObjectSample;
	
	import mx.core.FlexGlobals;
	
	import views.hvac.Heating;

	public class HeatingController
	{
		
		public function HeatingController()
		{
		}
		
		public function updateSubsoilHeatExchanger(subsoilHeatExchanger:SubsoilHeatExchanger):void
		{
			FlexGlobals.topLevelApplication.project.heating.subsoilHeatExchanger = subsoilHeatExchanger;
		}
		
		/*public function updateSubsoilHeatExchangerUISection():void
		{
			(FlexGlobals.topLevelApplication.screenCollection[8] as Heating).updateSubsoilHeatExchangerSection(this.getSubsoilHeatExchanger());
		}*/

		public function updateHeatRecoverySystem(heatRecoverySystem:HeatRecoverySystem):void
		{
			FlexGlobals.topLevelApplication.project.heating.heatRecoverySystem = heatRecoverySystem;
		}
		
		/*public function updateHeatRecoverySystemUISection():void
		{
			(FlexGlobals.topLevelApplication.screenCollection[8] as Heating).updateHeatRecoverySystemSection(this.getHeatRecoverySystem()); 
		}*/
		
		/*public function updateHeatingUIData():void
		{
			this.updateHeatRecoverySystemUISection();
			this.updateSubsoilHeatExchangerUISection();
		}*/
		
		public function getHeatRecoverySystem():HeatRecoverySystem
		{
			return FlexGlobals.topLevelApplication.project.heating.heatRecoverySystem;
		}
		
		public function getSubsoilHeatExchanger():SubsoilHeatExchanger
		{
			return FlexGlobals.topLevelApplication.project.heating.subsoilHeatExchanger;
		}
		
		public function updateHeatingOverviewStatus():void
		{
			//FlexGlobals.topLevelApplication.overviewPalette.hvacStatus();
		}
	}
}